home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 22 / 4 / DISK2247.ZIP / CBASE101.ZIP / LSEQ101.ZIP / LSPUTR.C < prev    next >
Text File  |  1990-06-20  |  1KB  |  50 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)lsputr.c    1.4 - 90/06/20" */
  5.  
  6. /* ansi headers */
  7. /*#include <stddef.h>*/
  8.  
  9. /* local headers */
  10. #include "lseq_.h"
  11.  
  12. /*man---------------------------------------------------------------------------
  13. NAME
  14.      lsputr - put current lseq record
  15.  
  16. SYNOPSIS
  17.      #include <lseq.h>
  18.  
  19.      int lsputr(lsp, buf)
  20.      lseq_t *lsp;
  21.      const void *buf;
  22.  
  23. DESCRIPTION
  24.      The lsputr function writes the record pointed to by buf into the
  25.      current record in lseq lsp.  buf must point to a storage area at
  26.      least as large as the record size for lsp.
  27.  
  28.      lsputr will fail if one or more of the following is true:
  29.  
  30.      [EINVAL]       lsp is not a valid lseq pointer.
  31.      [EINVAL]       buf is the NULL pointer.
  32.      [LSELOCK]      lsp is not write locked.
  33.      [LSENOPEN]     lsp is not open.
  34.      [LSENREC]      The cursor is null.
  35.  
  36. SEE ALSO
  37.      lscursor, lsgetr, lsputrf.
  38.  
  39. DIAGNOSTICS
  40.      Upon successful completion, a value of 0 is returned.  Otherwise,
  41.      a value of -1 is returned, and errno set to indicate the error.
  42.  
  43. ------------------------------------------------------------------------------*/
  44. int lsputr(lsp, buf)
  45. lseq_t *lsp;
  46. const void *buf;
  47. {
  48.     return lsputrf(lsp, (size_t)0, buf, lsp->lshdr.recsize);
  49. }
  50.